/*
day282
2020.6.5
*/
#include<iostream>
#include<vector> 
using namespace std;


class Solution {
public:
    bool searchMatrix(vector<vector<int>>& matrix, int target) {
    	if(matrix.empty())
		{
			return false;
		 } 
		int row=matrix.size()-1,column=matrix.front().size()-1;
		int i=row,j=0;
		while(i>=0 && j<=column)
		{
			if(matrix[i][j]==target)
			{
				return true;
			}
			if(matrix[i][j]<target)
			{
				j++;
			}
			else
			{
				i--;
			}
		}
		return false;
    }
};

int main()
{
	return 0;
}
